<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<html>
  <head>  
    <title>
      <fmt:message key="title"/>
    </title>  
    <style>    .error { color: red; }   
    </style>   
  <script>
	function msg(value)
	{
	alert($value);
	}
</script>
  
  </head>
 
 <body>
 
 
 <!-- TABLE BORDER=5 CELLPADDING=5 CELLSPACING=10--> 
    <table width="95%" bgcolor="f8f8ff" border="5" cellspacing="10" cellpadding="5">
		<tr>
		<th>Mraca Prodotto</th>
		<th>Nome Prodotto</th>
		<th>Prezzo</th>
		<th>Quantita</th>
		</tr>
		<c:forEach items="${model.prodotti}" var="prodo">
		<tr>
		   
      		<td><c:out value="${prodo.marcaProdotto}"/> </td>
      		<td><c:out value="${prodo.nomeProdotto}"/> </td>
      		<td><c:out value="${prodo.prezzoProdotto}"/> </td>
      		<td><c:out value="${prodo.quantita}"/></td>
      		<td><input type="checkbox" name="option1" value="Milk"> Milk<br></td>
      	</tr>
      	</c:forEach>
	</table>
  
  
<form:form method="post" commandName="aggiorna">
   <!--select name="prodotti">
			<option value=""></option>
			<c:forEach items="${model.prodotti}" var="prodo">
			 <option value="${prodo.idProdotto}">${prodo.marcaProdotto}, ${prodo.nomeProdotto}, ${prodo.prezzoProdotto}</option>
			</c:forEach>
	</select-->
	
	<form:select path="id">
		<form:option value="NONE" label="--- Select ---"/>
		<form:options items="${prodottiList}" />
	</form:select>
	
	<input type="submit" align="center" value="submit">
   <br>
 </form:form>
	
 <br><br>
 <a href="<c:url value="registrazione.htm"/>">Registrazione</a>
 <br>
 </body>
   <a href="<c:url value="hello.htm"/>">Home</a>
   
   <a href="<c:url value="aggiornaSuccess.htm"/>">Registrazione</a>
   
 </html>